
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<link href="css/style.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
        input {display: inline}
        span {display: inline}
    </style>
<script type="text/javascript">
    function checkform(tmp_form) {
        var err = document.getElementById('tips');
        if(form1.deptname.value == "") {
            err.innerHTML = "<font color = red>请输入部门名称</font>";
            form1.deptname.focus();
            return false;
        }
        if(form1.location.value == "") {
            err.innerHTML = "<font color = red>请输入位置信息</font>";
            form1.location.focus();
            return false;
        }
        return true;
    }

</script>

</head>

<body>
	<div class="place">
    <span>位置：</span>
    <ul class="placeul">
    <li><a href="#">人事管理</a></li>
    <li><a href="#">添加部门</a></li>
    </ul>
    </div>
    
    <div class="formbody">
    
    <div class="formtitle"><span>基本信息</span></div>
    <form name="form1" action="ptu/DeptServlet?method=deptSave" method="post" onsubmit="return checkform();">
        <ul class="forminfo">
            <li>
                <label>部门名称</label>
                <input name="deptname" id="deptname" type="text" class="dfinput" />
                <span id="deptnameerror"></span>
            </li>
            <li>
                <label>办公地点</label><input name="location" id="location" type="text" class="dfinput" />
                <td><span id="locationerror"></span></td>
            </li>
            <li><label>&nbsp;</label><input name="" type="submit" class="btn" value="确认保存"/></li>
            <p id="tips">&nbsp;</p>
        </ul>
    </form>
    </div>

</body>
</html>
